package com.xteam.xnetworkdisk.sys.controller;

import com.xteam.xnetworkdisk.sys.service.impl.IPService;
import com.xteam.xnetworkdisk.utils.IPApiUtils;
import com.xteam.xnetworkdisk.utilsinterface.IPUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping("/ip")
public class IPController {
    @Autowired
    private IPService ipService;
    @GetMapping("/getIp")
    public String getIp(HttpServletRequest request) {
        String deviceByRequest = ipService.getDeviceByRequest(request);
        return deviceByRequest;
    }
}
